import datetime


# 输入日期的函数
def input_date():
    inputdate = input('请输入开始日期:(20220120)后回车:')
    datestr = inputdate[0:4] + '-' + inputdate[4:6] + '-' + inputdate[6:]  # str
    dt = datetime.datetime.strptime(datestr, '%Y-%m-%d')
    return dt

if __name__ == '__main__':
    date = input_date()
    # print(date, type(date))
    in_num = eval(input('请输入间隔数:'))
    date = date + datetime.timedelta(days=in_num)
    print('您推算的日期是:', date)